package cn.micro.eye.commons.auth;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Micro Token Body
 *
 * @author lry
 */
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class TokenBody {

    public static final String USER_ID = "user_id";
    public static final String USER_NAME = "user_name";
    public static final String CLIENT_ID = "client_id";
    public static final String AUTHORITIES = "authorities";
    public static final String OTHERS = "others";

    private Long userId;
    private String userName;
    private String clientId;
    private List<String> authorities = new ArrayList<>();
    private Map<String, Object> others = new HashMap<>();

}
